import * as assert from 'assert';

try{
    assert(false,"错误信息");
}catch(err){
    /**
     * 错误消息，包含以下字段
     * name: 'AssertionError [ERR_ASSERTION]'
     * code: 'ERR_ASSERTION'
     * actual: false
     * expected: true
     * operator: '=='
     */
    console.log(err);
}